$(function() {
	var tabNav = $("[data-role='tabNav']"),
		tabFrame = $("[data-role='tabFrame']");
	
	tabNav.children(".item").on("click", function() {
		var thisObj = $(this);
		thisObj.parent().children(".active").removeClass("active");
		thisObj.addClass("active");
		thisObj.parent().children(".line").attr("style", 
			"-webkit-transform: translate3d(" + (thisObj.index()*100) + "%, 0, 0); " +
			"transform: translate3d(" + (thisObj.index()*100) + "%, 0, 0); "
		);
		
		$("#" + thisObj.parent().data("control")).attr("style", 
			"-webkit-transform: translate3d(-" + (thisObj.index()*100) + "%, 0, 0); " +
			"transform: translate3d(-" + (thisObj.index()*100) + "%, 0, 0); "
		);
	});
});
